Fixing an exception happening when a task has no associated browser.

Before integrating this pull request:
- [x] add a test