Fix merge commit statistics calculation