Extensive fixes