fixing R