Fix bugs and allow setting of Mach number.