Made shitty query parser marginally better