Fixed issue where child logs weren't getting linked to the parent log
Fixed issue where child logs weren't getting linked to the parent log because the parent was getting saved before the children