fixed some hash bugs