correct some assignmets by rearrangement