fixing log on closing connection..