remove spurious mains