some more improvements to make cli stable