correct entities mistakes in code