Bugfix/5552 recover from invalid tickets

also fixes #5545