Fix bug in variable declarations