Change moving algorithm (still buggy, but better)