Changed place of the overlap avoiding behavior.