Fix 'undefined variable task' error in gate. Use empty.