Fixing class comparison