fixed interface to dynamic_cast<shared_ptr>
tweaked archives to use/restore original local rather than the global "classic" one