Caught getStDists exception when routino fails