restoring text field correctly