fixed newly introduced js bug