fixed bug when legend text is not 16px