fixed stupid js bug