minor maj and bug fixe