fixed js bug that was non-critical before jquery upgrade but now is.