Fixed an issue with the size of the array that tracks occupied cells.