Fix check if class exists