fix bug #171: a first attempt