Dirty hack to reconnect on failure.