fix hash dictionary py3