add handling for offline hosts and bad requests