r minor fixes