fix periodic task creation