Added fix to make sure legend displayed correctly
Added fix to make sure legend displayed correctly