Updated Changelog added test for #341
Added debugging for query counter