fixed a js issue