Point calculator doesn't work properly