fixing order when editing a node