fix incremental prefix computation