Fix issue with casting of Point class