diff --git a/modules/Bio/EnsEMBL/Translation.pm b/modules/Bio/EnsEMBL/Translation.pm
index 9b9a44e17a2e28cbd64a20be9ecf481e8b1a5171..03bd1726241a159afd3fdfdebd73ee99c71b7c20 100755
--- a/modules/Bio/EnsEMBL/Translation.pm
+++ b/modules/Bio/EnsEMBL/Translation.pm
@@ -955,18 +955,20 @@ sub get_all_SeqEdits {
 =cut
 
 sub modify_translation {
-  my ($self, $seq) = @_;
+  my ( $self, $seq ) = @_;
 
-  my @seqeds = @{$self->get_all_SeqEdits()};
+  my @seqeds = @{ $self->get_all_SeqEdits() };
 
-  # sort in reverse order to avoid complication of adjusting downstream edits
-  @seqeds = sort {$b <=> $a} @seqeds;
+  # Sort in reverse order to avoid complication of adjusting
+  # downstream edits.
+  @seqeds = sort { $b->start() <=> $a->start() } @seqeds;
 
-  # apply all edits
+  # Apply all edits.
   my $peptide = $seq->seq();
   foreach my $se (@seqeds) {
-    $se->apply_edit(\$peptide);
+    $se->apply_edit( \$peptide );
   }
+
   $seq->seq($peptide);
 
   return $seq;