fix javascript class