fixed bug with calculating BIC for linear models