small tweak to JS