There are solder pastes designed to minimize this. If you cannot switch the pins they must be cleaned regularly.