pass by reference bug fixed (again)