Fixing ref_ptr usage.

Fixing ref_ptr usage.