improved offline check