some fixes for md5 cross-version compatibility