fix use of undefined parts of R after a LDR