Merge pull request #123 from iNecas/issue/116

Stop planning right after some error occurred
Fully working deduplication