Prevent "duplicate entry" exceptions