Add logic to the matrix code to fix issue with multiple high pins during scan