Offline mode bug fix