bugfix: on resume thread check for right states.

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>