Fixes error i begin/rescue block when an error occurs while syncronizing