Fix non-working example code (well, it worked in Firefox but failed in Chrome).