Fix class cast exception
Fix
Merge pull request #300 from lakshmi-kannan/bf_fix_class_cast

Bf fix class cast