Fixed graceful shutdown issue with investigator