Edit now works correctly. Parent id is preserved when editing.