Improve collision detection with defective pixels