Added check for empty result sets while syncronizing.