Fix issue with variable declaration