Added proper code for new maintenance mode feature.