fix checks element.length
fix element_updated callback