Fixed obvious bug in calc_RT