fixed calculation of special points