Desktop code with defects fixed