fixed a bug in PV, infinite cycles happens sometimes (dont know why,
maybe a collision with hashkey....)