minor script change. application to behave properly when server is down.