Corrected example code (GitHub issue #11).