fix JS issues