fixed query binding in search