fixed problem with keyed tables, thanks Denes