Fixed return by reference functions