Two small changes to the prior pull request that solve some glitches.