fixing conflict due to merge with master in legend.js