Fix bug with field creation