Applied patch from Antoine Jacoutot, fixing #724524