Latest fixes for Tria, fixed windows build