Fixed bugs in GJK algorithm