bug fix: prevent connection errors