fix cli mode check