fix bugs in passing doctype into geocoding