Fix serverUrl detection