reorder args for OpenURLInDefaultBrowser and other fixes