That's too much code to wade through. Point to where in this code mass the collisions are (and sometimes aren't) being detected.