more indexerror fixes