Bug fix for syncing all but last file