small generic fixes