Fixed deleting a file that was being used as a preview image.