avoid undefined to appear in the text boxes