fix class check when rendering fields