removing legend duplication bug