finally fixed note out of range