Fixed bug regarding date processing