fix copy resource error.