Fix small bugs in parameterized output mapping code