#727 fixed build failure caused due class cast exception