fixed error with js