Fixed: the miscalculation of changes if the file terminates in blank line.