more debug code. no progress!
fix one R_alloc problem