Possible fixes for #991