MPC random small bug fixes