form legend bug fix