Fix append bug