fixed typo and added more information to error message