Fixing errors in how BIC is calculated