Fixed bug in hash