fixed a bug in intersection calculation. HOLY SHIT I SEE A TEAPOT