commander: added some failsafe logic