fix a js mistake