Fixed crash that occurs when the connection times out