legend bug fixed