fixed 1 bug in getGlobalPoints