small fixes from Sam