Mitigating undersampling errors in MR fingerprinting by sequence optimization