fix a bug if print an undefined