Fixed connection error bug.