An apology would prevent them.
An apology would discourage them.