Fix for #987