Fix crash from sync adapter