bug fixed append procedure.