Fixed compilation issues with new Ptr