Fixed out of memory error on XP/ Vista