Fixed bug in XP