Sanitize registered class name (#929)