fix empty variable bug