Fix some bugs in the incremental plugin.