resolved brepl caused 'appendChild' error