Patch class_exist calls