fixed error in history detection
fixed error in argument diff detection