Offline mode bug fixing