Fixes an issue where queried document comes back as xml