Fixed several test errors (and joint parameter constant mismatch in CPP)