Fixed the triangle problem?

Yeah! It seems i have fixed the triangle problem for now! :D Still have
to optimize the code to linq. Somehow.