fixed append bug