Bug fix

Typo in reference to r variable