Fixed a bug with append