BaseTask pattern replacement fix.