Fix bug in sample app