Fixed a problem where a file was deleted even though the copy limit had not been reached