Fixed a bug that was causing the sync service to crash.