Improve controller error management