Added type coercion for integer fields
Updated for resolving references