Few changes to fix intermittent device store data loss