At every place dynamic_cast replaced with static_cast