Fixing a bug with calculating the improved legacy level