Fixed bugs for units moving