Changed switch method of MainViewController in order to refresh interface.