Correctly handle task selection