Revert 301, fix issue in legend template