fix for connection close