small js bug