Fix crash when incorrectly calling AddTask intent