Made sure the parent of a class/module is null after creation