Fix MD5 calculation