fixed custom command without selection does not run

Change-Id: Ia9318e2d912e2b60e56a0ebf619d2686dea873be