Fixed a bug that prevented the sync process to run under certain circumstances.