fixed problem of sync canceling itself right away
added missing line