Fix issue with tune function.