I should probably know the things I write better. Fixed uncaught IndexError