fixing directory creation