fix some bugs: commandline & environment vars