bugfix $wmgr_home should be set earlier