fix bug #228, part 1

close part of bug #228