Adding os_waitqueue_finalize. It was missing and therefore task cannot
deasosiate itself when condition was meet right after os_waitqueue_prepare