Fixing scope breakage when helper returns fn function