fixing maintenance mode bug