fixing collision bug