Fixes diff calculation for transparency