Fixed some errors with append