Fixed a bug in the code.

Reference:
http://googleresearch.blogspot.com.br/2006/06/extra-extra-read-all-about-it-nearly.html?m=1