fix md5 calculation