attempt to fix IndexOutOfBounds exception on Windows