remove spurious characters