Fixed the copying dir part