Fixed bug where visitor wasn't being passed into constructor