Fix bugs in diff start implementation