Fix ClassCastException
Merge pull request #13 from idunnololz/idunnololz/fix_class_cast_crash

Fix ClassCastException