fix for nested directories not always been created