fix (max|min|avg)_key to `to_f`