fixed bug where the connection lost error appends every failed attempt