fixed bad R