Pop environment after function calls