Fix use of out of scope declaration