Fixed some Win XP bugs