Updated the code with the changes from tomakehurst 1.34 to 1.36 (Nov 7 2013)