fixed zero variances error