offline state working properly