Fixed error handling, render is no longer called in the destructor of controller.