cleanup ret