add replace 0 for offline