Fix bad cast in TransportFactory::fitProperties