fixed md5 calculation