Fixed the seg fault. Subject is now passed to collideGridEles by pointer reference.