fixed token extending bug if the date happened to be more than 31 days in the
past