Fixes problem of it failing to reconnect