Fix a potential bug parsing a model id from window.location.