bugfix (bug occurs when the devie state was resetted)