Updated to reset if signing fails and hope for the best afterwards