js bug fixing