Fix xp calculation