fixed query parsing in delete command