Fix bug in analyzeFinal.