fixed bug where we'd get a null pointer for trying to complete/remove a
task before looking at the list. That's not a thing many users would
have done anyway but it's better to preven the error anyway.