fix key problem in hashtables (possibly slower, still looking)