Fix unnecessary pass by value