fixing issues in cmd tool