#280 by Bill Adams from a local branch so it can be tested by Travis