Fixed quitting-problem and ping timeout