bug fixes to solver, mphys driver and mphys code