synced with hermes
minor windows fixes