Add put online/offline mechanism(ugly).