Some tweaks.
Figure out why _ref is set to null.