Fixed legend on frame deletion.