Pawel's defect4 changes