address misc. memory leaks