Fix, declare/assign r directly instead