Several fixes for WP / Tasks. Fixes #1643.