small fix to JS