fixed a deletion query