fixes #40
fixed support for environment