corrected bug in date splitting