added != handling to query option parsing code