fixed issues when app is offline