Fix js bug