Fixed cmdmgr

I guess we should return -1 or something... not sure though... Feels wrong to return nothing.