Changed SmartPtr lock.