Fix 'r' command issues