fixing troublesome -r