correct invalid return-by-reference