Avoid ClassCastException
Merge pull request #35 from kuozhang/avoid-ClassCastException

Avoid ClassCastException