js update for some bug fixes