Fixed minor js bug