fixed copying directories