Fix #427 improve restore windows behavior