Fixed error in offline mode