Fix ClassCastException in  sample app
Merge pull request #4 from inferjay/master

Fix ClassCastException in  sample app