Fixed a load of gibberish which had broken the queries.