those detection arrays are going to be the death of me. I am going to add some debugging around them and try to track down what is going on....