Fix #23 Exception when generating diff for detect-changes