make some fix in code