Improve prevTask option