Fixed stupid behaviour when network connection is lost.