setenv fix

fixes the issue #22