Fix two bugs if app is down