Improve the error messages here