Correct usage of missing variable after copying code.