Minor fixes to MD5 function