Fix an issue in StoreChannel.writeAll()