Fix incorrect task reference

Use a task id for add_story() instead of an undeclared variable.