found a couple bugs in the append functionality