sensord: fix the problem that attribute is not restored properly