Fix #24: NPE on empty task list