Fixed dynamic binding for smart pointers.
WIP