Fixed bug for empty keys.