fix top level return problem