fix creating extra query