Fixes #1527: Remove only the appropriate part