Fix problems with MD5 and SHA hash writers