Fix bug for Windows XP compatibility