Fix segfault due to naming confusion in field allocation.