Preventing two types of well clogging