Actually after looking at this, before you return null but, you need to first execute the same logic as lines 2062-2076