fixed writer reference return issue
fixed writer reference return issue

stan-dev/stan,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/stan,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/stan,stan-dev/math,stan-dev/stan,stan-dev/stan,stan-dev/math