Fixed bug with the legend

https://github.com/mostaphaRoudsari/ladybug/issues/77