Fix for #982