fix error in dict reference in output