bug 1047: do not use undefined variable $log for calcing points