Fixed bug in hash_overwrite and refactored hash_update