remove malformed lines