fixed host matching; added restart event handler