Bf fix class cast