Added error checking to zero-variance for calpha.