#299 fix key bug when nulls are mixed in