Fix task creation