bugfix: environment not initialized prior to append