Fixes for bug with field duplication