fixing ret cleanup for return for meta