Fixes for bad_return (missing tuple nesting level) and for not exported function.