Fixed bug in the Hash method