Updated deprecated shared_dynamic_cast to dynamic_pointer_cast

three files updated!