Fixes to DiffMain