Fixing uninitialized elementdefinition array bug