fixed a bug on variable decleration