Fix incorrect session substitutions