Applied fix to line 7808 causing error when parent set to null.