Fixed TM generation. Some parameters were floats not doubles!