Fixed major bug in clone_directory