support attribute change event, bugs fix