fix rubbish hash function