Possible fix for #981