fixed xp calculation