fixed some indexerrors