Added support to work on a copy of a resource in edit screen, otherwise it updates the original resource even if the user decided to cancel.