fixing dodgy cloning operations on resource definitions