[TIMOB-18097]: Fix CLI crashes

Testing steps in JIRA. Also please make sure KS builds properly