fixed possible null pointer in insertTask()