Fixed exception in legend when color missing