deleting invalid