fixing subdirectories problem