Fixed a bug in super classes checking