Adding try/catch in slave handlers to avoid crashes.