Fixing Legend issue in plot 4