fixed grahamscan solver