Fix issue with nil keys.