fix sertificate time check