I managed to encounter a reproduceable situation where line 17 removed two entries from axesSize rather than one (as two of the three entries in cd were equal to the maximum value), which resulted in the following lines throwing an error after trying to access element 2 of axesSize. This change should ensure that line 17 only ever removes one element from axesSize.
I managed to encounter a reproduceable situation where line 17 removed two entries from axesSize rather than one (as two of the three entries in cd were equal to the maximum value), which resulted in the following lines throwing an error after trying to access element 2 of axesSize. This change should ensure that line 17 only ever removes one element from axesSize.