Test and fix untyped array bug.
Test and fix IMaterial bug.