Fix bad initialenvironment (related to adding ~)