Fixed bug when server is offline