some fixes on CLI