Thank you that seemed to fix that part.
I executed following queries
CREATE TABLE ost_thread_entry_email_backup
Clean up duplicates
DELETE t1 FROM ost_thread_entry_email t1
INNER JOIN ost_thread_entry_email t2
t1.id < t2.id AND
t1.thread_entry_id = t2.thread_entry_id;
I will check why I was not able to delete tickets. Maybe this was fixed with this fix as well.