fix nil ptr deref and make cloudlus cmd work with new changes