Fixed the appendChildren function's bug.