Minor js bug fixed