Fixed query double delete