Try changing
Code:
var %bad.away = $hget(bad.away,%a).item
to
Code:
var %bad.away = $hget(bad.away,%a).data


Other than that possibility, I don't see anything wrong with your code.


P.S.: Please use the Code Tags (button looks like #) around your code in the future. It makes it easier to read.