copy resource correctly