view: fix rare crash when connecting