Fixes wrong variable names introduced by null collection values serializ...

...ation fix