fixed for sub dirs.