Updated server to prevent crashes