Fixing MTEntryModifiedDate

On my individual entry pages, I show two dates: the date on which I created the entry, and the date on which I modified the entry. Today, after making some changes to an entry, I noticed that the modification date was not updated.
I found some information about this problem in earlier versions of Movable Type on the Tweezer’s Edge, but they state that this error has been fixed in the 3.x versions. I guessed that the same solution should work on my version (MT3.11 at the moment), I only needed to find out the right line in the scripts to fix. I tried some options, and found that the following fixes the problem:
Edit /lib/MT.pm, and add the text shown on line 598:
596 $ctx->stash(‘entry’, $entry);
597 $ctx->{current_timestamp} = $entry->created_on;
598 $ctx->{modification_timestamp} = $entry->modified_on;
599 $cond{EntryIfAllowComments} = $entry->allow_comments;