Nip it in the bud

1. Fixing a small problem, usually to prevent a larger problem from happening.