fixed bugs causing it not to run on latest mosek