Fix an invalid class name
Improve error messages