Fixes problems with unnamed returns in functions