fix some javascript class errors