More fixes for #991