I am not sure why you are getting null values. I was not able to reproduce the observed behavior on my end. For convenience, I prepared a small sample, based on the information that you provided so far and attached it to this thread.
Could you please check it and let me know how it differs from your real setup?
Thank you in advance for your patience and cooperation.