Slightly better connection handling