Fixed error where parent is None