Fix the append bug