Prevention of two types of well clogging