bugfix: fix invalid check of task.

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