Make sure we always put a valid URL on the edit tab, and allow switching