Small JavaScript fix.

@drj11 @pwaller @zarino can someone merge this change please