Fix to allow raw sql queries to be sent