Fix issue with error response