Bug fix for MPC