Fixed index out of bounds bug that would occur when upgrading from 1.0.5 to 1.1.0