fixes for non-arc memory leaks