Try to fix toWrite nulling.