Correcting code to be what we actually used in the screencast

And also, the original code doesn't actually work - thanks to Mark Fox for the tip via the comments.