fixed js issues