minor fix bugs in sample22