Changed logic of setting textField value