Fixed rising wrong variable on retry fail, issue #156