fix compound collision bug caused by optimization