bugfix: scripts were executed regardless of environment