From Krzysiek P. Matrix-minor fix