fixed gmres, should be fully correct now