Defective code fixed