Fix overwrite flag when copying resources