Fixed crash on sync bug