Merge pull request #54 from simplyianm/master

Make cleanQuery run after middleware