Fix query json on delete by query