Fixed a problem in py3+ with rescaling and added a simple test to exercise it.