Fix connecting to instrument when port is not available on startup