fix xp calculation