Fix connection max_matches and timeout resetting