fixes for various issues with changing to URIs