Fixed a bug to support datetime keys