Fixed processing the last range