Improve type resolution for fields