fixed connection handling