fixed small bug in stanfore core implementation