Hoisting error causing screen shot to fail

Should fix hoisting error.