More type conversion fixes