mod: some improvements.