fix unit overlap bug