Stable rc

Fix various crashes in the web interface. Fix capture-replace and most of the numbering inconsistencies.