reconnect fix and logging errors