some fix in code