Revised k5 parameter calculation. Tried different error functions and different settings for the optimization, it all failed.