fix caller locals leaking into callee, some TODOs