Fixing pass by reference error.