Fixed variable declaration in middle of scope