Fix connection handling for puma.