Fix NullPointerException if you somehow store a task without a stage