fixed few bugs in Deterministic MPC