fix creating directories