fixing .js bug