Do not run callback twice when detection is failed

It causes a callback duplication on asynchronous iteration.