Fix incorrect field type detection