Fix a js bug