Fix environment callback regression
Merge pull request #1047 from heuripedes/master

Fix environment callback regression