more minor bug fixes by MPC
fixed merge conflicts