don't assign last element with (null, null)
Merge pull request #4918 from minggo/develop

don't assign last element with (null, null)