Fix logic when checking execute type.
Fix logic when checking execute types.