fix  offline mode