fixes provided by bluquet