Improve class-member related errors