properly stack environments