fixes connection problems