fix too many queries