bugfix in environment