fixed windows crash bug.