fixed a bug when declaring new variables