Fix var declaration issue