End sector is always one less than total. Ever heard of counting from 0?