Query with bug