this is a corrections to some of the ligic in commit 3851f619 that commit set a pointer to NULL, which it should not have.