Fix using a variable on the wrong object