added logging and handled case of Visit.sender being invalid