Fix diff_main return type
Fix method calls on patch_*