Dispose the controller and the splash screen in case of error