fixed class exists check