Sometime back I happened to check the George Hernandez's site http://www.georgehernandez.com/. In one of his page I found an error in his code snippet. I sent him a note on the same with a code snippet which could be used instead.
George has reviewed it and has responed back:
Hey thanks a lot for the correction. I updated my page with your
suggestion and credited you for it.