widget: fix index (forgot to use newly created canvas.has_before property)