Added some safety checks for the connection view