fixed small js bug