stable, fixed issue with incorrect matrix