Some fixes in temporary allocation pass and ckernel interp