fixed offline bug