Fix for #971