fixed two problems with array/hash deferencing