[#568] fix the onCollision handler, and use the last response API