Updated error with class reference