Improved error handling in case of unkown class name.