maj and minor bug fixe