Fixed a bug with very long keys.