Fixed bug when a hash[] returns nil