bug fixes for offline support