Fix #831 actually by sbillard on the fork which I forgot to credit properly.