Last patch re #323 was a sledgehammer to crack a walnut. This is a better solution.