fixed small JS bug