fix bug 228, part 1