Some typo that caused compilation error or run time error have been fixed

Hi,

Thank you for the sample app! 

Some typo that caused compilation error or run time error have been fixed. Please accept the pull request and the fixes can be automatically merged.

Best,
Neo