Possible fix for #987