fix bug in sample6