minor fix to class check