some bugs when configuring environment and the way to fix them