Improve error message behavior