fixed #61 (can't disconnect without connection)