fix a bug in a sample