fix refresh connection on exception