Fix crashed on Windows