Fixed: except also for KeyError and IndexError