A few fixes to pbkdf2 hashing