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

Fix ClassCastException