Fix: make sure the std::transform is safe to be called
Minor changes.