Add state to ticket, fix some tests