fix 0-base to 1-base