fixed read loop range