Fixed null exception being thrown when connection timeout occurs