bug 1391: added range check for points