fix the null pointer assignment issue in the decoupled code

this time for real. promised.