Fixed a crash when a class has no assignments, and modified error messages to make sense