Fixed bug of clearing the hidden hashes too soon