Make global topology constant in trajectory writing