Fix condition for deletion.