handling offline status, fixes #292