fixed bug in setting home directory