Fixed a few bugs in handling monthly and yearly data.