fix the issue when editing a field