Better rpt fix

Fixes the same error as last commit, but in a better way. Came to me
just after commiting.