Fixed database error on ticket change

Updated status keys in various places so that queries would cause errors
when querying the database