Fix problem of not setting the current hash id in the right place.