fix $HOME is empty, better