Fixed potential bug with class names with spaces