Misha's fixes