fix query model