The distinct structure and universality of the standard genetic code (SGC) have fascinated the scientists ever since the first amino acid assignments were discovered. There are several hypotheses trying to explain the origin and evolution of this code. One of them postulates that the SGC evolved to minimize harmful effects of amino acid replacements in proteins, caused by mutations and translational errors. Many investigations concerning this hypothesis have already been carried out, but they were focused mainly on the consequences of single-point mutations. Therefore, we decided to check the influence of other types of mutations, i.e. insertions and deletions, on the robustness to amino acid replacements of the SGC. Such mutations cause shifts in the reading frame during the translation process which result in more harmful consequences in coded proteins than in the case of single-point mutations. We applied a multi-objective optimization algorithm to find the best and the worst genetic codes, regarding their robustness to both single-point and frameshift mutations, for various amino acid properties. Then we compared the features of the found codes with the properties of the standard genetic code. The results show that the SGC is not fully optimized for minimizing the effects of frameshift mutations but it is, nevertheless, much closer to the best solutions than to the worst ones. It implies that a certain tendency to minimize the costs of amino acids replacements resulting from various kinds of mutations is present in the standard genetic code.