[CORE] Correct few leaks in in/out computation