fixed bug that occured if no host directory was set