Fix CLI tool issues