fixed minor issue with format_date()