correct what appears to be two long-standing memory leaks; thanks to EP
normalize tabs/spaces