bug fix: wrong class check