Fixed issue with legend getting truncated when using dev.copy.