Correct Rg output failure in caclulate_rfactor