Cmake and scriptmgr fixes from last commit