ucli memory fixes

Reviewer: @jnealtowns