Fixing date string bug