fixed final rsync code