change some cell index bases from 1 to 0
fix over view point bug when height is bigger than width