Added proper support for `shared` type.