Remove redundant resource copying