fixed certificate verification bug!