fixing bugs based on cli refactor