Fix passing by reference