minor fixed bugs in sample22