Updated build_query for mid
Merge pull request #43 from beardy-unixer/master

Update build_query for mid