it seems like the task is getting called twice for some reason