Fixed error with variable declarations