tom: general fixes