Fixed IndexError bug