Fix conflicting overuse of "ret" as a variable name