fixing r