Added bugfix for no user dir