a js bug modified