Rem2pi(pi) errors

There is a PR to fix, but it hasn’t been merged for 2 years.