Fix indexing in divide map