Fixing explicit field type casting