fix a bug in the sample app