Fixed broken compare, replace and incremental diff