Small error with var declaration