fixed hash calculations