Fix pass-by-reference error