Global well posedness of traffic flow models with phase transitions