fix issue with detect tasks not behaving