fixing null visitor issue