fixes some an issue with to_date on 1.8.7