Deleting invalid image