Fixed task_id generation