Fixing random crash calculating xp/hr