Materials array check, fixes issue with inner array of materials[0]